﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="公司生产进度表2.aspx.cs" Inherits="syc.Juece.Report.公司生产进度表2" %>

<%@ Import Namespace="NPOI.HSSF.UserModel" %>
<%@ Import Namespace="NPOI.HPSF" %>
<%@ Import Namespace="System.IO" %>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Data.SqlClient" %>
<%@ Import Namespace="System.Configuration" %>
<html>
    
<head id="Head1" runat="server">
    <title></title>
 
    </head>
<body>
<script runat="server">
    protected double 带钢合计月完成率;
    protected double 带钢合计年完成率;
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            this.Year0.SelectedValue = DateTime.Today.Year.ToString();
            this.Month0.SelectedValue = DateTime.Today.Month.ToString();
            RiQi.Text = DateTime.Today.AddDays(-1).ToString("yyyy年M月d日");
        }
        Button_Query_Click(null, null);
    }

    protected void WriteToFile()
    {
        DateTime d;
        if (!DateTime.TryParse(this.RiQi.Text, out d))
        {
            d = DateTime.Today;
        }
        Response.ContentType = "application/ms-excel";
        Response.AddHeader("content-disposition", "attachment; filename=\"" + d.ToShortDateString() + ".xls\"");
        hssfworkbook.Write(Response.OutputStream);
    }

    protected void InitializeWorkbook()
    {

        FileStream file = new FileStream(HttpContext.Current.Server.MapPath("/JueCe/模板/公司生产进度表2.xls"), FileMode.Open, FileAccess.Read);

        hssfworkbook = new HSSFWorkbook(file);

        DocumentSummaryInformation dsi = PropertySetFactory.CreateDocumentSummaryInformation();
        dsi.Company = "陕西延长石油材料有限公司";
        hssfworkbook.DocumentSummaryInformation = dsi;

        SummaryInformation si = PropertySetFactory.CreateSummaryInformation();
        si.Subject = "报表";
        si.Title = "陕西延长石油材料公司生产进度表";
        hssfworkbook.SummaryInformation = si;
    }

    protected void Button_Save_Click(object sender, EventArgs e)
    {

        InitializeWorkbook();
        HSSFSheet sheet1 = hssfworkbook.GetSheet("陕西延长石油材料公司生产进度表");
        sheet1.GetRow(1).GetCell(0).SetCellValue("填报日期：" + this.RiQi.Text);
        Button_Query_Click(null, null);
        sheet1.GetRow(4).GetCell(3).SetCellValue(ntaojihua / 10000);
        sheet1.GetRow(4).GetCell(4).SetCellValue(ytaojihua);
        sheet1.GetRow(4).GetCell(5).SetCellValue(dtao);
        sheet1.GetRow(4).GetCell(6).SetCellValue(mtao);
        sheet1.GetRow(4).GetCell(7).SetCellValue(ytao);
        sheet1.GetRow(4).GetCell(8).SetCellValue(mtao完成率.ToString("0.0"));
        sheet1.GetRow(4).GetCell(9).SetCellValue(ytao完成率.ToString("0.0"));

        sheet1.GetRow(5).GetCell(3).SetCellValue(n1taojihua / 10000);
        sheet1.GetRow(5).GetCell(4).SetCellValue(y1taojihua);
        sheet1.GetRow(5).GetCell(5).SetCellValue(d1tao);
        sheet1.GetRow(5).GetCell(6).SetCellValue(m1tao);
        sheet1.GetRow(5).GetCell(7).SetCellValue(y1tao);
        sheet1.GetRow(5).GetCell(8).SetCellValue(m1tao完成率.ToString("0.0"));
        sheet1.GetRow(5).GetCell(9).SetCellValue(y1tao完成率.ToString("0.0"));

        sheet1.GetRow(6).GetCell(3).SetCellValue(n1taon80jihua / 10000);
        sheet1.GetRow(6).GetCell(4).SetCellValue(y1taon80jihua);
        sheet1.GetRow(6).GetCell(5).SetCellValue(d1taon80);
        sheet1.GetRow(6).GetCell(6).SetCellValue(m1taon80);
        sheet1.GetRow(6).GetCell(7).SetCellValue(y1taon80);
        sheet1.GetRow(6).GetCell(8).SetCellValue(m1taon80完成率.ToString("0.0"));
        sheet1.GetRow(6).GetCell(9).SetCellValue(y1taon80完成率.ToString("0.0"));

        sheet1.GetRow(7).GetCell(3).SetCellValue((n1taojihua + n1taon80jihua) / 10000);
        sheet1.GetRow(7).GetCell(4).SetCellValue(y1taojihua + y1taon80jihua);
        sheet1.GetRow(7).GetCell(5).SetCellValue(d1tao + d1taon80);
        sheet1.GetRow(7).GetCell(6).SetCellValue(m1tao + m1taon80);
        sheet1.GetRow(7).GetCell(7).SetCellValue(y1tao + y1taon80);
        sheet1.GetRow(7).GetCell(8).SetCellValue(一分厂合计月完成率.ToString("0.0"));
        sheet1.GetRow(7).GetCell(9).SetCellValue(一分厂合计年完成率.ToString("0.0"));

        sheet1.GetRow(8).GetCell(3).SetCellValue(n2taojihua / 10000);
        sheet1.GetRow(8).GetCell(4).SetCellValue(y2taojihua);
        sheet1.GetRow(8).GetCell(5).SetCellValue(d2tao);
        sheet1.GetRow(8).GetCell(6).SetCellValue(m2tao);
        sheet1.GetRow(8).GetCell(7).SetCellValue(y2tao);
        sheet1.GetRow(8).GetCell(8).SetCellValue(m2tao完成率.ToString("0.0"));
        sheet1.GetRow(8).GetCell(9).SetCellValue(y2tao完成率.ToString("0.0"));

        sheet1.GetRow(9).GetCell(3).SetCellValue(nyoujihua / 10000);
        sheet1.GetRow(9).GetCell(4).SetCellValue(yyoujihua);
        sheet1.GetRow(9).GetCell(5).SetCellValue(dyou);
        sheet1.GetRow(9).GetCell(6).SetCellValue(myou);
        sheet1.GetRow(9).GetCell(7).SetCellValue(yyou);
        sheet1.GetRow(9).GetCell(8).SetCellValue(myou完成率.ToString("0.0"));
        sheet1.GetRow(9).GetCell(9).SetCellValue(yyou完成率.ToString("0.0"));

        //sheet1.GetRow(10).GetCell(3).SetCellValue(n2youjihua / 10000);
        //sheet1.GetRow(10).GetCell(4).SetCellValue(y2youjihua);
        //sheet1.GetRow(10).GetCell(5).SetCellValue(d2you);
        //sheet1.GetRow(10).GetCell(6).SetCellValue(m2you);
        //sheet1.GetRow(10).GetCell(7).SetCellValue(y2you);
        //sheet1.GetRow(10).GetCell(8).SetCellValue(m2you完成率.ToString("0.0"));
        //sheet1.GetRow(10).GetCell(9).SetCellValue(y2you完成率.ToString("0.0"));

        sheet1.GetRow(10).GetCell(3).SetCellValue(n5youjihua / 10000);
        sheet1.GetRow(10).GetCell(4).SetCellValue(y5youjihua);
        sheet1.GetRow(10).GetCell(5).SetCellValue(d5you);
        sheet1.GetRow(10).GetCell(6).SetCellValue(m5you);
        sheet1.GetRow(10).GetCell(7).SetCellValue(y5you);
        sheet1.GetRow(10).GetCell(8).SetCellValue(m5you完成率.ToString("0.0"));
        sheet1.GetRow(10).GetCell(9).SetCellValue(y5you完成率.ToString("0.0"));

        sheet1.GetRow(11).GetCell(3).SetCellValue((nyoujihua + ntaojihua) / 10000);
        sheet1.GetRow(11).GetCell(4).SetCellValue(yyoujihua + ytaojihua);
        sheet1.GetRow(11).GetCell(5).SetCellValue(dyou + dtao);
        sheet1.GetRow(11).GetCell(6).SetCellValue(myou + mtao);
        sheet1.GetRow(11).GetCell(7).SetCellValue(yyou + ytao);
        sheet1.GetRow(11).GetCell(8).SetCellValue(油套管月完成率.ToString("0.0"));
        sheet1.GetRow(11).GetCell(9).SetCellValue(油套管年完成率.ToString("0.0"));


        //sheet1.GetRow(8).GetCell(2).SetCellValue(180000);
        //sheet1.GetRow(8).GetCell(3).SetCellValue(7000);
        //sheet1.GetRow(8).GetCell(4).SetCellValue(tao1[0] + tao2[0] + you[0]);
        //sheet1.GetRow(8).GetCell(5).SetCellValue(tao1[1] + tao2[1] + you[1]);
        //sheet1.GetRow(8).GetCell(6).SetCellValue(tao1[2] + tao2[2] + you[2]);
        sheet1.GetRow(15).GetCell(3).SetCellValue(ntjiegujihua);
        sheet1.GetRow(15).GetCell(4).SetCellValue(ytjiegujihua);
        sheet1.GetRow(15).GetCell(5).SetCellValue(dtjiegu);
        sheet1.GetRow(15).GetCell(6).SetCellValue(mtjiegu);
        sheet1.GetRow(15).GetCell(7).SetCellValue(ytjiegu);
        sheet1.GetRow(15).GetCell(8).SetCellValue(mtjiegu完成率.ToString("0.0"));
        sheet1.GetRow(15).GetCell(9).SetCellValue(ytjiegu完成率.ToString("0.0"));

        sheet1.GetRow(16).GetCell(3).SetCellValue(nyjiegujihua);
        sheet1.GetRow(16).GetCell(4).SetCellValue(yyjiegujihua);
        sheet1.GetRow(16).GetCell(5).SetCellValue(dyjiegu);
        sheet1.GetRow(16).GetCell(6).SetCellValue(myjiegu);
        sheet1.GetRow(16).GetCell(7).SetCellValue(yyjiegu);
        sheet1.GetRow(16).GetCell(8).SetCellValue(myjiegu完成率.ToString("0.0"));
        sheet1.GetRow(16).GetCell(9).SetCellValue(yyjiegu完成率.ToString("0.0"));

        sheet1.GetRow(17).GetCell(3).SetCellValue(nbaohuqijihua);
        sheet1.GetRow(17).GetCell(4).SetCellValue(ybaohuqijihua);
        sheet1.GetRow(17).GetCell(5).SetCellValue(dbaohuqi);
        sheet1.GetRow(17).GetCell(6).SetCellValue(mbaohuqi);
        sheet1.GetRow(17).GetCell(7).SetCellValue(ybaohuqi);
        sheet1.GetRow(17).GetCell(8).SetCellValue(mbaohuqi完成率.ToString("0.0"));
        sheet1.GetRow(17).GetCell(9).SetCellValue(ybaohuqi完成率.ToString("0.0"));

        sheet1.GetRow(18).GetCell(3).SetCellValue(带钢年计划);
        sheet1.GetRow(18).GetCell(4).SetCellValue(带钢月计划);
        sheet1.GetRow(18).GetCell(5).SetCellValue(带钢当日);
        sheet1.GetRow(18).GetCell(6).SetCellValue(带钢本月);
        sheet1.GetRow(18).GetCell(7).SetCellValue(带钢本年);
        sheet1.GetRow(18).GetCell(8).SetCellValue(带钢月完成率.ToString("0.0"));
        sheet1.GetRow(18).GetCell(9).SetCellValue(带钢年完成率.ToString("0.0"));
      
        sheet1.GetRow(19).GetCell(4).SetCellValue(不锈钢月计划);
        sheet1.GetRow(19).GetCell(5).SetCellValue(不锈钢当日);
        sheet1.GetRow(19).GetCell(6).SetCellValue(不锈钢本月);
        sheet1.GetRow(19).GetCell(7).SetCellValue(不锈钢本年);
        sheet1.GetRow(19).GetCell(8).SetCellValue(不锈钢月完成率.ToString("0.0"));
        sheet1.GetRow(19).GetCell(9).SetCellValue(不锈钢年完成率.ToString("0.0"));

       
        sheet1.GetRow(20).GetCell(4).SetCellValue(外加工月计划);
        sheet1.GetRow(20).GetCell(5).SetCellValue(外加工当日);
        sheet1.GetRow(20).GetCell(6).SetCellValue(外加工本月);
        sheet1.GetRow(20).GetCell(7).SetCellValue(外加工本年);
        sheet1.GetRow(20).GetCell(8).SetCellValue(外加工月完成率.ToString("0.0"));
        sheet1.GetRow(20).GetCell(9).SetCellValue(外加工年完成率.ToString("0.0"));

        sheet1.GetRow(21).GetCell(3).SetCellValue(带钢年计划);
        sheet1.GetRow(21).GetCell(4).SetCellValue(带钢月计划 + 不锈钢月计划 + 外加工月计划);
        sheet1.GetRow(21).GetCell(5).SetCellValue(带钢当日 + 不锈钢当日 + 外加工当日);
        sheet1.GetRow(21).GetCell(6).SetCellValue(带钢本月 + 不锈钢本月 + 外加工本月);
        sheet1.GetRow(21).GetCell(7).SetCellValue(带钢本年 + 不锈钢本年 + 外加工本年);
        sheet1.GetRow(21).GetCell(8).SetCellValue(带钢合计月完成率.ToString("0.0"));
        sheet1.GetRow(21).GetCell(9).SetCellValue(带钢合计年完成率.ToString("0.0"));

        //string op = (string)this.Session["OperatorName"];
        //if (op != null)
        //{
        //    sheet1.GetRow(9).GetCell(5).SetCellValue(op);
        //}
        //sheet1.ForceFormulaRecalculation = true;
        WriteToFile();
        Response.End();
    }

    protected void Button_Query_Click(object sender, EventArgs e)
    {
        month = int.Parse(this.Month0.SelectedValue);
        year = int.Parse(this.Year0.SelectedValue);
        DateTime d1;
        if (!DateTime.TryParse(this.RiQi.Text, out d1))
        {
            this.Message.Text = "·请输入日期";
            return;
        }
        //if (!DateTime.TryParse(this.RiQi2.Text, out d2))
        //{
        //    this.Message.Text = "·请输入累计日期";
        //    return;
        //}
        //if (!DateTime.TryParse(this.RiQi3.Text, out d3))
        //{
        //    this.Message.Text = "·请输入年累计日期";
        //    return;
        //}

        SqlConnection Conn = new SqlConnection();
        Conn.ConnectionString = ConfigurationManager.ConnectionStrings["SCMConnectionString1"].ConnectionString;
        Conn.Open();
        SqlCommand Cmd = new SqlCommand();
        Cmd.Connection = Conn;
        //获得月计划
        Cmd.CommandText = @"select isnull(二分厂产品1,0),isnull(五分厂产品1,0),isnull(一分厂产品2,0),isnull(二分厂产品2,0),isnull(三分厂产品1,0),isnull(三分厂产品2,0),isnull(四分厂产品2,0),isnull(一分厂产品4,0) from 生产计划 where 年度='" + year + "' and 月份='" + month + "'";
        SqlDataReader Reader = Cmd.ExecuteReader();
        if (Reader.Read())
        {
            //油管量
            y2youjihua = Reader.GetDouble(0);
            y5youjihua = Reader.GetDouble(1);
            //套管量
            y1taojihua = Reader.GetDouble(2);
            y2taojihua = Reader.GetDouble(3);
            //油接箍
            yyjiegujihua = Reader.GetDouble(4);
            ytjiegujihua = Reader.GetDouble(5);
            ybaohuqijihua = Reader.GetDouble(6);
            //套管n80
            y1taon80jihua = Reader.GetDouble(7);
        }
        Reader.Close();
        // yyoujihua = y2youjihua + y5youjihua;
        yyoujihua = y5youjihua;
        ytaojihua = y1taojihua + y2taojihua + y1taon80jihua;

        //获得年计划
        Cmd.CommandText = @"select isnull(二分厂产品1,0),isnull(五分厂产品1,0),isnull(一分厂产品2,0),isnull(二分厂产品2,0),isnull(三分厂产品1,0),isnull(三分厂产品2,0),isnull(四分厂产品2,0),isnull(一分厂产品4,0) from 生产计划 where 年度='" + year + "' and 月份=0";
        Reader = Cmd.ExecuteReader();
        if (Reader.Read())
        {
            //油管量
            n2youjihua = Reader.GetDouble(0);
            n5youjihua = Reader.GetDouble(1);
            //套管量
            n1taojihua = Reader.GetDouble(2);
            n2taojihua = Reader.GetDouble(3);
            //油接箍
            nyjiegujihua = Reader.GetDouble(4);
            ntjiegujihua = Reader.GetDouble(5);
            nbaohuqijihua = Reader.GetDouble(6);
            //套管n80
            n1taon80jihua = Reader.GetDouble(7);
        }
        Reader.Close();
        // nyoujihua = n2youjihua + n5youjihua;
        nyoujihua = n5youjihua;
        ntaojihua = n1taojihua + n2taojihua + n1taon80jihua;
        //---------------------------
        //当日入库量

        string sql = @"
            declare @d2you float
            declare @d5you float
            declare @d1tao float
            declare @d2tao float
            declare @d1taon80 float
            declare @dyjiegu int
            declare @dtjiegu int
            declare @dbaohuqi int         
            declare @riqi smalldatetime
            select  @d2you=round(isnull(sum(入库重量),0)/1000,3) from 生产进度 where 分厂ID=2 and 产品类别ID=1 and 日期='" + DateTime.Parse(this.RiQi.Text) + "'  select @d5you=round(isnull(sum(入库重量),0)/1000,3) from 生产进度 where 分厂ID=5 and 产品类别ID=1 and 日期='" + DateTime.Parse(this.RiQi.Text) + "' select @d1tao=round(isnull(sum(入库重量),0)/1000,3) from 生产进度 where 分厂ID=1 and 产品类别ID=2 and 日期='" + DateTime.Parse(this.RiQi.Text) + "' select @d2tao=round(isnull(sum(入库重量),0)/1000,3) from 生产进度 where 分厂ID=2 and 产品类别ID=2 and 日期='" + DateTime.Parse(this.RiQi.Text) + "'select @dyjiegu=isnull(sum(磷化支数),0) from 生产进度3 where [产品类别ID]=1 and 日期='" + DateTime.Parse(this.RiQi.Text) + "' select @dtjiegu=isnull(sum(磷化支数),0) from 生产进度3 where [产品类别ID]=2 and 日期='" + DateTime.Parse(this.RiQi.Text) + "'  select @dbaohuqi=isnull(sum(入库),0) from 生产进度4 where 日期='" + DateTime.Parse(this.RiQi.Text) + "' select  @d1taon80=round(isnull(sum(入库重量),0)/1000,3) from 生产进度 where 分厂ID=1 and 产品类别ID=4 and 日期='" + DateTime.Parse(this.RiQi.Text) + "' select @d2you,@d5you,@d1tao,@d2tao,@dyjiegu,@dtjiegu,@dbaohuqi,@d1taon80";

        Cmd.CommandText = sql;
        Reader = Cmd.ExecuteReader();
        if (Reader.Read())
        {
            //油管量
            d2you = Reader.GetDouble(0);
            d5you = Reader.GetDouble(1);
            //套管量
            d1tao = Reader.GetDouble(2);
            d2tao = Reader.GetDouble(3);
            //油接箍
            dyjiegu = Reader.GetInt32(4);
            dtjiegu = Reader.GetInt32(5);
            dbaohuqi = Reader.GetInt32(6);
            //套管N80量
            d1taon80 = Reader.GetDouble(7);
        }
        Reader.Close();
        //dyou = d2you + d5you;
        dyou = d5you;
        dtao = d1tao + d2tao + d1taon80;
        //---------------------------
        //当月入库量累计

        string sql1 = @"
            declare @m2you float
            declare @m5you float
            declare @m1tao float
            declare @m2tao float
            declare @m1taon80 float
            declare @myjiegu int
            declare @mtjiegu int
            declare @mbaohuqi int
           
           
            declare @1yc smalldatetime 
           
            declare @2yc smalldatetime 
          
            declare @3yc smalldatetime 
           
            declare @4yc smalldatetime 
           
            declare @5yc smalldatetime 
          
            select  @1yc=起始日期 from  生产月设置 where 分厂=1 and 年度='" + year + "' and 月份='" + month + "' select distinct @2yc=起始日期 from  生产月设置 where 分厂=2 and 年度='" + year + "' and 月份='" + month + "' select distinct @3yc=起始日期 from  生产月设置 where 分厂=3 and 年度='" + year + "' and 月份='" + month + "' select distinct @4yc=起始日期 from  生产月设置 where 分厂=4 and 年度='" + year + "' and 月份='" + month + "' select distinct  @5yc=起始日期 from 生产月设置  where 分厂=5 and 年度='" + year + "' and 月份='" + month + "' select  @m2you=round(isnull(sum(入库重量),0)/1000,3) from 生产进度 where 分厂ID=2 and 产品类别ID=1 and 日期 between @2yc and '" + DateTime.Parse(this.RiQi.Text) + "' select  @m5you=round(isnull(sum(入库重量),0)/1000,3) from 生产进度 where 分厂ID=5 and 产品类别ID=1 and 日期 between @5yc and '" + DateTime.Parse(this.RiQi.Text) + "' select  @m1tao=round(isnull(sum(入库重量),0)/1000,3) from 生产进度 where 分厂ID=1 and 产品类别ID=2 and 日期 between @1yc and '" + DateTime.Parse(this.RiQi.Text) + "' select  @m2tao=round(isnull(sum(入库重量),0)/1000,3) from 生产进度 where 分厂ID=2 and 产品类别ID=2 and 日期 between @2yc and '" + DateTime.Parse(this.RiQi.Text) + "' select @myjiegu=isnull(sum(磷化支数),0) from 生产进度3 where [产品类别ID]=1 and 日期 between @3yc and '" + DateTime.Parse(this.RiQi.Text) + "' select @mtjiegu=isnull(sum(磷化支数),0) from 生产进度3 where [产品类别ID]=2 and 日期 between @3yc and '" + DateTime.Parse(this.RiQi.Text) + "'  select @mbaohuqi=isnull(sum(入库),0) from 生产进度4 where 日期 between @4yc and '" + DateTime.Parse(this.RiQi.Text) + "' select  @m1taon80=round(isnull(sum(入库重量),0)/1000,3) from 生产进度 where 分厂ID=1 and 产品类别ID=4 and 日期 between @1yc and '" + DateTime.Parse(this.RiQi.Text) + "' select @m2you,@m5you,@m1tao,@m2tao,@myjiegu,@mtjiegu,@mbaohuqi,@m1taon80";

        Cmd.CommandText = sql1;
        Reader = Cmd.ExecuteReader();
        if (Reader.Read())
        {
            //油管量
            m2you = Reader.GetDouble(0);
            m5you = Reader.GetDouble(1);
            //套管量
            m1tao = Reader.GetDouble(2);
            m2tao = Reader.GetDouble(3);
            //油接箍
            myjiegu = Reader.GetInt32(4);
            mtjiegu = Reader.GetInt32(5);
            mbaohuqi = Reader.GetInt32(6);
            //套管n80量
            m1taon80 = Reader.GetDouble(7);
        }
        Reader.Close();
        //myou = m2you + m5you;
        myou = m5you;
        mtao = m1tao + m2tao + m1taon80;

        //当年入库量累计
        string sql2 = @"
            declare @y2you float
            declare @y5you float
            declare @y1tao float
            declare @y2tao float
            declare @y1taon80 float
            declare @yyjiegu int
            declare @ytjiegu int
            declare @ybaohuqi int
          
            declare @1nc smalldatetime 
           
            declare @2nc smalldatetime 
           
            declare @3nc smalldatetime 
           
            declare @4nc smalldatetime 
            
            declare @5nc smalldatetime 
            
            select  @1nc=(select distinct 起始日期 from  生产月设置 where 分厂=1 and 年度='" + year + "' and 月份=1) select  @2nc=(select distinct 起始日期 from  生产月设置 where 分厂=2 and 年度='" + year + "' and 月份=1) select  @3nc=(select distinct 起始日期 from 生产月设置 where 分厂=3 and 年度='" + year + "' and 月份=1) select  @4nc=(select distinct 起始日期 from  生产月设置 where 分厂=4 and 年度='" + year + "' and 月份=1) select @5nc=(select distinct 起始日期 from 生产月设置  where 分厂=5 and 年度='" + year + "' and 月份=1) select  @y2you=round(isnull(sum(入库重量),0)/1000,3) from 生产进度 where 分厂ID=2 and 产品类别ID=1 and 日期 between @2nc and '" + DateTime.Parse(this.RiQi.Text) + "' select  @y5you=round(isnull(sum(入库重量),0)/1000,3) from 生产进度 where 分厂ID=5 and 产品类别ID=1 and 日期 between @5nc and '" + DateTime.Parse(this.RiQi.Text) + "' select  @y1tao=round(isnull(sum(入库重量),0)/1000,3) from 生产进度 where 分厂ID=1 and 产品类别ID=2 and 日期 between @1nc and '" + DateTime.Parse(this.RiQi.Text) + "' select  @y2tao=round(isnull(sum(入库重量),0)/1000,3) from 生产进度 where 分厂ID=2 and 产品类别ID=2 and 日期 between @2nc and '" + DateTime.Parse(this.RiQi.Text) + "' select @yyjiegu=isnull(sum(磷化支数),0) from 生产进度3 where [产品类别ID]=1 and 日期 between @3nc and '" + DateTime.Parse(this.RiQi.Text) + "' select @ytjiegu=isnull(sum(磷化支数),0) from 生产进度3 where [产品类别ID]=2 and 日期 between @3nc and '" + DateTime.Parse(this.RiQi.Text) + "'  select @ybaohuqi=isnull(sum(入库),0) from 生产进度4 where 日期 between @4nc and '" + DateTime.Parse(this.RiQi.Text) + "' select  @y1taon80=round(isnull(sum(入库重量),0)/1000,3) from 生产进度 where 分厂ID=1 and 产品类别ID=4 and 日期 between @1nc and '" + DateTime.Parse(this.RiQi.Text) + "' select @y2you,@y5you,@y1tao,@y2tao,@yyjiegu,@ytjiegu,@ybaohuqi,@y1taon80 ";

        Cmd.CommandText = sql2;
        Reader = Cmd.ExecuteReader();
        if (Reader.Read())
        {
            //油管量
            y2you = Reader.GetDouble(0);
            y5you = Reader.GetDouble(1);
            //套管量
            y1tao = Reader.GetDouble(2);
            y2tao = Reader.GetDouble(3);
            //油接箍
            yyjiegu = Reader.GetInt32(4);
            ytjiegu = Reader.GetInt32(5);
            ybaohuqi = Reader.GetInt32(6);
            //套管n80量
            y1taon80 = Reader.GetDouble(7);
        }
        Reader.Close();
        // yyou = y2you + y5you;
        yyou = y5you;
        ytao = y1tao + y1taon80 + y2tao;
        if (ytaojihua == 0)
        {
            mtao完成率 = 0;
        }
        else
        {
            mtao完成率 = ((mtao / ytaojihua) * 100);
        }
        if (y1taojihua == 0)
        {
            m1tao完成率 = 0;
        }
        else
        {
            m1tao完成率 = ((m1tao / y1taojihua) * 100);
        }
        if (y1taon80jihua == 0)
        {
            m1taon80完成率 = 0;
        }
        else
        {
            m1taon80完成率 = ((m1taon80 / y1taon80jihua) * 100);
        }
        if ((y1taojihua + y1taon80jihua) == 0)
        {
            一分厂合计月完成率 = 0;
        }
        else
        {
            一分厂合计月完成率 = (((m1tao + m1taon80) / (y1taojihua + y1taon80jihua)) * 100);
        }
        if (y2taojihua == 0)
        {
            m2tao完成率 = 0;
        }
        else
        {
            m2tao完成率 = ((m2tao / y2taojihua) * 100);
        }
        if (yyoujihua == 0)
        {
            myou完成率 = 0;
        }
        else
        {
            myou完成率 = ((myou / yyoujihua) * 100);
        }
        //if (y2youjihua == 0)
        //{
        //    m2you完成率 = 0;
        //}
        //else
        //{
        //    m2you完成率 = ((m2you / y2youjihua) * 100);
        //}
        if (y5youjihua == 0)
        {
            m5you完成率 = 0;
        }
        else
        {
            m5you完成率 = ((m5you / y5youjihua) * 100);
        }
        if (yyjiegujihua == 0)
        {
            myjiegu完成率 = 0;
        }
        else
        {
            myjiegu完成率 = ((myjiegu / yyjiegujihua) * 100);
        }
        if (ytjiegujihua == 0)
        {
            mtjiegu完成率 = 0;
        }
        else
        {
            mtjiegu完成率 = ((mtjiegu / ytjiegujihua) * 100);
        }
        if (ybaohuqijihua == 0)
        {
            mbaohuqi完成率 = 0;
        }
        else
        {
            mbaohuqi完成率 = ((mbaohuqi / ybaohuqijihua) * 100);
        }


        //-----------------------------------------
        if (ntaojihua == 0)
        {
            ytao完成率 = 0;
        }
        else
        {
            ytao完成率 = ((ytao / ntaojihua) * 100);
        }
        if (n1taojihua == 0)
        {
            y1tao完成率 = 0;
        }
        else
        {
            y1tao完成率 = ((y1tao / n1taojihua) * 100);
        }
        if (n1taon80jihua == 0)
        {
            y1taon80完成率 = 0;
        }
        else
        {
            y1taon80完成率 = ((y1taon80 / n1taon80jihua) * 100);
        }
        if ((n1taojihua + n1taon80jihua) == 0)
        {
            一分厂合计年完成率 = 0;
        }
        else
        {
            一分厂合计年完成率 = (((y1tao + y1taon80) / (n1taojihua + n1taon80jihua)) * 100);
        }
        if (n2taojihua == 0)
        {
            y2tao完成率 = 0;
        }
        else
        {
            y2tao完成率 = ((y2tao / n2taojihua) * 100);
        }
        if (nyoujihua == 0)
        {
            yyou完成率 = 0;
        }
        else
        {
            yyou完成率 = ((yyou / nyoujihua) * 100);
        }
        //if (n2youjihua == 0)
        //{
        //    y2you完成率 = 0;
        //}
        //else
        //{
        //    y2you完成率 = ((y2you / n2youjihua) * 100);
        //}
        if (n5youjihua == 0)
        {
            y5you完成率 = 0;
        }
        else
        {
            y5you完成率 = ((y5you / n5youjihua) * 100);
        }
        if (ntjiegujihua == 0)
        {
            ytjiegu完成率 = 0;
        }
        else
        {
            ytjiegu完成率 = ((ytjiegu / ntjiegujihua) * 100);
        }
        if (nyjiegujihua == 0)
        {
            yyjiegu完成率 = 0;
        }
        else
        {
            yyjiegu完成率 = ((yyjiegu / nyjiegujihua) * 100);
        }
        if (nbaohuqijihua == 0)
        {
            ybaohuqi完成率 = 0;
        }
        else
        {

            ybaohuqi完成率 = ((ybaohuqi / nbaohuqijihua) * 100);
        }
        if ((yyoujihua + ytaojihua) == 0)
        {
            油套管月完成率 = 0;
        }
        else
        {
            油套管月完成率 = ((myou + mtao) / (yyoujihua + ytaojihua) * 100);
        }
        if ((nyoujihua + ntaojihua) == 0)
        {
            油套管年完成率 = 0;
        }
        else
        {
            油套管年完成率 = ((yyou + ytao) / (nyoujihua + ntaojihua) * 100);
        }

        string sql01=
@"select cast(isnull(年计划,0) as float) as 年计划
, cast(isnull(月计划,0) as float) as 月计划
,cast(isnull(当日,0) as float) as 当日
,cast(isnull(本月,0) as float) as 本月
,cast(isnull(本年,0) as float) as 本年
from 精密带钢进度 where 日期='" + DateTime.Parse(this.RiQi.Text) + "'";
        Cmd.CommandText = sql01;
        Reader = Cmd.ExecuteReader();
        if (Reader.Read())
        {
            带钢年计划 = Reader.GetDouble(0);
            带钢月计划 = Reader.GetDouble(1);
            带钢当日 = Reader.GetDouble(2);
            带钢本月 = Reader.GetDouble(3);
            带钢本年 = Reader.GetDouble(4);
            if (带钢月计划 > 0)
            {
                带钢月完成率 = 带钢本月 / 带钢月计划 * 100;
            }
            if (带钢年计划 > 0)
            {
                带钢年完成率 = 带钢本年 / 带钢年计划 * 100;
            }
        }
        Reader.Close();

        Cmd.CommandText =
@"select cast(isnull(年计划,0) as float) as 年计划
, cast(isnull(月计划,0) as float) as 月计划
,cast(isnull(当日,0) as float) as 当日
,cast(isnull(本月,0) as float) as 本月
,cast(isnull(本年,0) as float) as 本年
from 不锈钢进度 where 日期='" + DateTime.Parse(this.RiQi.Text) + "'";
        Reader = Cmd.ExecuteReader();
        if (Reader.Read())
        {
            不锈钢年计划 = Reader.GetDouble(0);
            不锈钢月计划 = Reader.GetDouble(1);
            不锈钢当日 = Reader.GetDouble(2);
            不锈钢本月 = Reader.GetDouble(3);
            不锈钢本年 = Reader.GetDouble(4);
            if (不锈钢月计划 > 0)
            {
                不锈钢月完成率 = 不锈钢本月 / 不锈钢月计划 * 100;
            }
            if (不锈钢年计划 > 0)
            {
                不锈钢年完成率 = 不锈钢本年 / 不锈钢年计划 * 100;
            }
        }
        Reader.Close();

        Cmd.CommandText =
@"select cast(isnull(年计划,0) as float) as 年计划
, cast(isnull(月计划,0) as float) as 月计划
,cast(isnull(当日,0) as float) as 当日
,cast(isnull(本月,0) as float) as 本月
,cast(isnull(本年,0) as float) as 本年
from 外加工进度 where 日期='" + DateTime.Parse(this.RiQi.Text) + "'";
        Reader = Cmd.ExecuteReader();
        if (Reader.Read())
        {
            外加工年计划 = Reader.GetDouble(0);
            外加工月计划 = Reader.GetDouble(1);
            外加工当日 = Reader.GetDouble(2);
            外加工本月 = Reader.GetDouble(3);
            外加工本年 = Reader.GetDouble(4);
            if (外加工月计划 > 0)
            {
                外加工月完成率 = 外加工本月 / 外加工月计划 * 100;
            }
            if (外加工年计划 > 0)
            {
                外加工年完成率 = 外加工本年 / 外加工年计划 * 100;
            }
        }
        Reader.Close();
        if((带钢月计划+不锈钢月计划+外加工月计划)>0){
            带钢合计月完成率 = (带钢本月 + 不锈钢本月 + 外加工本月) / (带钢月计划 + 不锈钢月计划 + 外加工月计划) * 100;
        }
        if ((带钢年计划 + 不锈钢年计划 + 外加工年计划) > 0)
        {
            带钢合计年完成率 = (带钢本年 + 不锈钢本年 + 外加工本年) / (带钢年计划 + 不锈钢年计划 + 外加工年计划) * 100;
        }
        Conn.Close();
        Reader.Dispose();
        Cmd.Dispose();
        Conn.Dispose();
    } 
    
</script>
    
   <script type="text/javascript" language="javascript" src="/common.js"></script>
    <form id="form1" runat="server">
    <div id="wintop" class="wintop">陕西延长石油材料公司进度报表</div>
        <asp:Panel ID="Panel3" runat="server" CssClass="panel">
            年份：<asp:DropDownList ID="Year0" runat="server" AutoPostBack="true">
            <asp:ListItem>2009</asp:ListItem>
            <asp:ListItem>2010</asp:ListItem>
            <asp:ListItem>2011</asp:ListItem>
            <asp:ListItem>2012</asp:ListItem>
            <asp:ListItem>2013</asp:ListItem>
            <asp:ListItem>2014</asp:ListItem>
            <asp:ListItem>2015</asp:ListItem>           
            </asp:DropDownList>
            &nbsp;月份：<asp:DropDownList ID="Month0" runat="server" AutoPostBack="true">
            <asp:ListItem>1</asp:ListItem>
            <asp:ListItem>2</asp:ListItem>
            <asp:ListItem>3</asp:ListItem>
            <asp:ListItem>4</asp:ListItem>
            <asp:ListItem>5</asp:ListItem>
            <asp:ListItem>6</asp:ListItem>
            <asp:ListItem>7</asp:ListItem>
            <asp:ListItem>8</asp:ListItem>
            <asp:ListItem>9</asp:ListItem>
            <asp:ListItem>10</asp:ListItem>
            <asp:ListItem>11</asp:ListItem>
            <asp:ListItem>12</asp:ListItem>
            </asp:DropDownList>
            <span lang="zh-cn">&nbsp;填报日期：<asp:TextBox ID="RiQi" runat="server" AutoPostBack="true"
                CssClass="intxt1" Width="110px"></asp:TextBox><img align="middle" alt="" 
                onclick="makecalendar(document.getElementById('RiQi').value, document.getElementById('RiQi'));" 
                src="/Icons/29.png" /></asp:textbox>            
            &nbsp;<asp:Button ID="Button_Query" runat="server" CssClass="button" 
                onclick="Button_Query_Click" Text="查看报表" UseSubmitBehavior="true"  Visible="false"/>
            <asp:Button ID="Button_Save" runat="server" CssClass="button" 
                onclick="Button_Save_Click" Text="导出报表" UseSubmitBehavior="False" />
            </span></asp:Panel>
        <asp:Panel ID="Panel2" runat="server" CssClass="panel2">
            <asp:Label ID="Message" runat="server" Text="·准备就绪" CssClass="prompt"></asp:Label>
        </asp:Panel>


        <asp:Panel ID="Panel4" runat="server" CssClass="panel3">



<div style="width:817px; text-align:center;">

<style>
<!--table
	{mso-displayed-decimal-separator:"\.";
	mso-displayed-thousand-separator:"\,";}
@page
	{margin:.13in .39in .59in .39in;
	mso-header-margin:.63in;
	mso-footer-margin:.31in;
	mso-page-orientation:landscape;
	mso-horizontal-page-align:center;
	mso-vertical-page-align:center;}
tr
	{mso-height-source:auto;
	mso-ruby-visibility:none;}
col
	{mso-width-source:auto;
	mso-ruby-visibility:none;}
br
	{mso-data-placement:same-cell;}
.style0
	{mso-number-format:General;
	text-align:general;
	vertical-align:middle;
	white-space:nowrap;
	mso-rotate:0;
	mso-background-source:auto;
	mso-pattern:auto;
	color:black;
	font-size:11.0pt;
	font-weight:400;
	font-style:normal;
	text-decoration:none;
	font-family:宋体;
	mso-generic-font-family:auto;
	mso-font-charset:134;
	border:none;
	mso-protection:locked visible;
	mso-style-name:常规;
	mso-style-id:0;}
td
	{mso-style-parent:style0;
	padding-top:1px;
	padding-right:1px;
	padding-left:1px;
	mso-ignore:padding;
	color:black;
	font-size:11.0pt;
	font-weight:400;
	font-style:normal;
	text-decoration:none;
	font-family:宋体;
	mso-generic-font-family:auto;
	mso-font-charset:134;
	mso-number-format:General;
	text-align:general;
	vertical-align:middle;
	border:none;
	mso-background-source:auto;
	mso-pattern:auto;
	mso-protection:locked visible;
	white-space:nowrap;
	mso-rotate:0;}
.xl65
	{mso-style-parent:style0;
	font-size:12.0pt;
	text-align:center;
	border:.5pt solid windowtext;}
.xl66
	{mso-style-parent:style0;
	font-size:12.0pt;
	text-align:center;
	border-top:.5pt solid windowtext;
	border-right:none;
	border-bottom:.5pt solid windowtext;
	border-left:.5pt solid windowtext;}
.xl67
	{mso-style-parent:style0;
	font-size:12.0pt;
	text-align:center;
	border-top:.5pt solid windowtext;
	border-right:none;
	border-bottom:.5pt solid windowtext;
	border-left:none;}
.xl68
	{mso-style-parent:style0;
	font-size:12.0pt;
	text-align:center;
	border-top:.5pt solid windowtext;
	border-right:.5pt solid windowtext;
	border-bottom:.5pt solid windowtext;
	border-left:none;}
.xl69
	{mso-style-parent:style0;
	font-size:12.0pt;
	text-align:center;
	border-top:.5pt solid windowtext;
	border-right:none;
	border-bottom:none;
	border-left:.5pt solid windowtext;}
.xl70
	{mso-style-parent:style0;
	font-size:12.0pt;
	text-align:center;
	border-top:.5pt solid windowtext;
	border-right:none;
	border-bottom:none;
	border-left:none;}
.xl71
	{mso-style-parent:style0;
	font-size:12.0pt;
	text-align:center;
	border-top:.5pt solid windowtext;
	border-right:.5pt solid windowtext;
	border-bottom:none;
	border-left:none;}
.xl72
	{mso-style-parent:style0;
	font-size:12.0pt;
	text-align:center;
	border-top:none;
	border-right:none;
	border-bottom:.5pt solid windowtext;
	border-left:.5pt solid windowtext;}
.xl73
	{mso-style-parent:style0;
	font-size:12.0pt;
	text-align:center;
	border-top:none;
	border-right:none;
	border-bottom:.5pt solid windowtext;
	border-left:none;}
.xl74
	{mso-style-parent:style0;
	font-size:12.0pt;
	text-align:center;
	border-top:none;
	border-right:.5pt solid windowtext;
	border-bottom:.5pt solid windowtext;
	border-left:none;}
.xl75
	{mso-style-parent:style0;
	font-size:12.0pt;
	text-align:center;
	border:.5pt solid windowtext;
	white-space:normal;}
.xl76
	{mso-style-parent:style0;
	font-size:14.0pt;
	font-weight:700;
	text-align:center;}
.xl77
	{mso-style-parent:style0;
	font-size:14.0pt;}
.xl78
	{mso-style-parent:style0;
	text-align:right;}
.xl79
	{mso-style-parent:style0;
	font-size:14.0pt;
	font-weight:700;
	text-align:left;}
.xl80
	{mso-style-parent:style0;
	font-size:20.0pt;
	font-family:黑体;
	mso-generic-font-family:auto;
	mso-font-charset:134;
	text-align:center;}
.xl81
	{mso-style-parent:style0;
	font-size:13.0pt;
	font-weight:700;
	text-align:center;}
ruby
	{ruby-align:left;}
rt
	{color:windowtext;
	font-size:9.0pt;
	font-weight:400;
	font-style:normal;
	text-decoration:none;
	font-family:宋体;
	mso-generic-font-family:auto;
	mso-font-charset:134;
	mso-char-type:none;
	display:none;}
-->
</style>
<!--[if gte mso 9]><xml>
 <x:ExcelWorkbook>
  <x:ExcelWorksheets>
   <x:ExcelWorksheet>
    <x:Name>陕西延长石油材料公司生产进度表</x:Name>
    <x:WorksheetOptions>
     <x:DefaultRowHeight>270</x:DefaultRowHeight>
     <x:Print>
      <x:ValidPrinterInfo/>
      <x:PaperSizeIndex>9</x:PaperSizeIndex>
      <x:HorizontalResolution>600</x:HorizontalResolution>
      <x:VerticalResolution>600</x:VerticalResolution>
     </x:Print>
     <x:CodeName>Sheet1</x:CodeName>
     <x:PageBreakZoom>75</x:PageBreakZoom>
     <x:Selected/>
     <x:Panes>
      <x:Pane>
       <x:Number>3</x:Number>
       <x:ActiveRow>5</x:ActiveRow>
       <x:ActiveCol>10</x:ActiveCol>
      </x:Pane>
     </x:Panes>
     <x:ProtectContents>False</x:ProtectContents>
     <x:ProtectObjects>False</x:ProtectObjects>
     <x:ProtectScenarios>False</x:ProtectScenarios>
    </x:WorksheetOptions>
   </x:ExcelWorksheet>
  </x:ExcelWorksheets>
  <x:WindowHeight>7815</x:WindowHeight>
  <x:WindowWidth>14880</x:WindowWidth>
  <x:WindowTopX>240</x:WindowTopX>
  <x:WindowTopY>90</x:WindowTopY>
  <x:ProtectStructure>False</x:ProtectStructure>
  <x:ProtectWindows>False</x:ProtectWindows>
 </x:ExcelWorkbook>
</xml><![endif]-->
</head>

<body>

<table x:str border=0 cellpadding=0 cellspacing=0 width=1019 style='border-collapse:
 collapse;table-layout:fixed;width:766pt'>
    <colgroup>
        <col style="mso-width-source:userset;mso-width-alt:2016;width:47pt" width="63">
        <col style="mso-width-source:userset;mso-width-alt:1472;width:35pt" width="46">
        <col style="mso-width-source:userset;mso-width-alt:1536;width:36pt" width="48">
        <col span="2" style="mso-width-source:userset;mso-width-alt:3200;
 width:75pt" width="100">
        <col span="3" style="mso-width-source:userset;mso-width-alt:4928;
 width:116pt" width="154">
        <col span="2" style="mso-width-source:userset;mso-width-alt:3200;
 width:75pt" width="100">
        <tr height="61" style="mso-height-source:userset;height:45.75pt">
            <td class="xl80" colspan="10" height="61" style="height:45.75pt;
  width:766pt" width="1019">
                陕西延长石油材料公司生产进度表</td>
        </tr>
        <tr height="34" style="mso-height-source:userset;height:25.5pt">
            <td class="xl81" colspan="10" height="34" style="height:25.5pt">
                填报时间：<%=this.RiQi.Text %></td>
        </tr>
        <tr height="33" style="mso-height-source:userset;height:24.75pt">
            <td class="xl65" colspan="3" height="65" rowspan="2" style="height:48.75pt">
                产品</td>
            <td class="xl65" colspan="2" style="border-left:none">
                计划</td>
            <td class="xl65" colspan="3" style="border-left:none">
                生产情况(吨)</td>
            <td class="xl65" colspan="2" style="border-left:none">
                完成率(%)</td>
        </tr>
        <tr height="32" style="mso-height-source:userset;height:24.0pt">
            <td class="xl65" height="32" style="height:24.0pt;border-top:none;border-left:
  none">
                年(万吨)</td>
            <td class="xl65" style="border-top:none;border-left:none">
                月(吨)</td>
            <td class="xl65" style="border-top:none;border-left:none">
                当日入库(吨)</td>
            <td class="xl65" style="border-top:none;border-left:none">
                月累计(吨)</td>
            <td class="xl65" style="border-top:none;border-left:none">
                年累计(吨)</td>
            <td class="xl65" style="border-top:none;border-left:none">
                月</td>
            <td class="xl65" style="border-top:none;border-left:none">
                年</td>
        </tr>
        <tr height="33" style="mso-height-source:userset;height:24.75pt">
            <td class="xl66" colspan="3" height="33" style="border-right:.5pt solid black;
  height:24.75pt">
                石油套管</td>
            <td class="xl65" style="border-top:none;border-left:none">
                <%=ntaojihua/10000%></td>
            <td class="xl65" style="border-top:none;border-left:none">
                <%=ytaojihua %></td>
            <td class="xl65" style="border-top:none;border-left:none">
                <%=dtao%></td>
            <td class="xl65" style="border-top:none;border-left:none">
                <%=mtao%></td>
            <td class="xl65" style="border-top:none;border-left:none">
                <%=ytao%></td>
            <td class="xl65" style="border-top:none;border-left:none">
                <%=mtao完成率.ToString("0.0")%></td>
            <td class="xl65" style="border-top:none;border-left:none">
                <%=ytao完成率.ToString("0.0")%></td>
        </tr>
        <tr height="33" style="mso-height-source:userset;height:24.75pt">
            <td class="xl69" colspan="2" height="66" rowspan="2" style="border-right:.5pt solid black;
  border-bottom:.5pt solid black;height:49.5pt">
                一分厂</td>
            <td class="xl65" style="border-top:none;border-left:none">
                J55</td>
            <td class="xl65" style="border-top:none;border-left:none">
                <%=n1taojihua/10000%></td>
            <td class="xl65" style="border-top:none;border-left:none">
                <%=y1taojihua %></td>
            <td class="xl65" style="border-top:none;border-left:none">
                <%=d1tao%></td>
            <td class="xl65" style="border-top:none;border-left:none">
                <%=m1tao%></td>
            <td class="xl65" style="border-top:none;border-left:none">
                <%=y1tao%></td>
            <td class="xl65" style="border-top:none;border-left:none">
                <%=m1tao完成率.ToString("0.0")%></td>
            <td class="xl65" style="border-top:none;border-left:none">
                <%=y1tao完成率.ToString("0.0")%></td>
        </tr>
        <tr height="33" style="mso-height-source:userset;height:24.75pt">
            <td class="xl65" height="33" style="height:24.75pt;border-top:none;border-left:
  none">
                N80Q</td>
            <td class="xl65" style="border-top:none;border-left:none">
                <%=n1taon80jihua / 10000%></td>
            <td class="xl65" style="border-top:none;border-left:none">
                <%=y1taon80jihua%></td>
            <td class="xl65" style="border-top:none;border-left:none">
                <%=d1taon80%></td>
            <td class="xl65" style="border-top:none;border-left:none">
                <%=m1taon80%></td>
            <td class="xl65" style="border-top:none;border-left:none">
                <%=y1taon80%></td>
            <td class="xl65" style="border-top:none;border-left:none">
                <%=m1taon80完成率.ToString("0.0")%></td>
            <td class="xl65" style="border-top:none;border-left:none">
                <%=y1taon80完成率.ToString("0.0")%></td>
        </tr>
        <tr height="33" style="mso-height-source:userset;height:24.75pt">
            <td class="xl66" colspan="3" height="33" style="border-right:.5pt solid black;
  height:24.75pt">
                一分厂合计</td>
            <td class="xl65" style="border-top:none;border-left:none">
                <%=(n1taojihua + n1taon80jihua) / 10000%></td>
            <td class="xl65" style="border-top:none;border-left:none">
                <%=(y1taojihua + y1taon80jihua)%></td>
            <td class="xl65" style="border-top:none;border-left:none">
                <%=(d1tao + d1taon80)%></td>
            <td class="xl65" style="border-top:none;border-left:none">
                <%=(m1tao + m1taon80)%></td>
            <td class="xl65" style="border-top:none;border-left:none">
                <%=(y1tao + y1taon80)%></td>
            <td class="xl65" style="border-top:none;border-left:none">
                <%=一分厂合计月完成率.ToString("0.0")%></td>
            <td class="xl65" style="border-top:none;border-left:none">
                <%=一分厂合计年完成率.ToString("0.0")%></td>
        </tr>
        <tr height="32" style="mso-height-source:userset;height:24.0pt">
            <td class="xl65" colspan="2" height="32" style="height:24.0pt">
                二分厂</td>
            <td class="xl65" style="border-top:none;border-left:none">
                J55</td>
            <td class="xl65" style="border-top:none;border-left:none">
                <%=n2taojihua/10000%></td>
            <td class="xl65" style="border-top:none;border-left:none">
                <%=y2taojihua%></td>
            <td class="xl65" style="border-top:none;border-left:none">
                <%=d2tao%></td>
            <td class="xl65" style="border-top:none;border-left:none">
                <%=m2tao%></td>
            <td class="xl65" style="border-top:none;border-left:none">
                <%=y2tao%></td>
            <td class="xl65" style="border-top:none;border-left:none">
                <%=m2tao完成率.ToString("0.0")%></td>
            <td class="xl65" style="border-top:none;border-left:none">
                <%=y2tao完成率.ToString("0.0")%></td>
        </tr>
        <tr height="32" style="mso-height-source:userset;height:24.0pt">
            <td class="xl66" colspan="3" height="32" style="border-right:.5pt solid black;
  height:24.0pt">
                石油油管</td>
            <td class="xl65" style="border-top:none;border-left:none">
                <%=nyoujihua/10000 %></td>
            <td class="xl65" style="border-top:none;border-left:none">
                <%=yyoujihua %></td>
            <td class="xl65" style="border-top:none;border-left:none">
                <%=dyou%></td>
            <td class="xl65" style="border-top:none;border-left:none">
                <%=myou%></td>
            <td class="xl65" style="border-top:none;border-left:none">
                <%=yyou %></td>
            <td class="xl65" style="border-top:none;border-left:none">
                <%=myou完成率.ToString("0.0")%></td>
            <td class="xl65" style="border-top:none;border-left:none">
                <%=yyou完成率.ToString("0.0")%></td>
        </tr>
        <tr height="32" style="mso-height-source:userset;height:24.0pt">
            <td class="xl65" colspan="2" height="32" style="height:24.0pt">
                五分厂</td>
            <td class="xl65" style="border-top:none;border-left:none">
                J55</td>
            <td class="xl65" style="border-top:none;border-left:none">
                <%=n5youjihua/10000%></td>
            <td class="xl65" style="border-top:none;border-left:none">
                <%=y5youjihua %></td>
            <td class="xl65" style="border-top:none;border-left:none">
                <%=d5you%></td>
            <td class="xl65" style="border-top:none;border-left:none">
                <%=m5you%></td>
            <td class="xl65" style="border-top:none;border-left:none">
                <%=y5you%></td>
            <td class="xl65" style="border-top:none;border-left:none">
                <%=m5you完成率.ToString("0.0")%></td>
            <td class="xl65" style="border-top:none;border-left:none">
                <%=y5you完成率.ToString("0.0")%></td>
        </tr>
        <tr height="32" style="mso-height-source:userset;height:24.0pt">
            <td class="xl66" colspan="3" height="32" style="border-right:.5pt solid black;
  height:24.0pt">
                油套管合计</td>
            <td class="xl65" style="border-top:none;border-left:none">
                <%=(nyoujihua + ntaojihua)/10000%></td>
            <td class="xl65" style="border-top:none;border-left:none">
                <%=yyoujihua+ytaojihua%></td>
            <td class="xl65" style="border-top:none;border-left:none">
                <%=dyou + dtao%></td>
            <td class="xl65" style="border-top:none;border-left:none">
                <%=myou + mtao%></td>
            <td class="xl65" style="border-top:none;border-left:none">
                <%=yyou+ytao%></td>
            <td class="xl65" style="border-top:none;border-left:none">
                <%=油套管月完成率.ToString("0.0")%></td>
            <td class="xl65" style="border-top:none;border-left:none">
                <%=油套管年完成率.ToString("0.0")%></td>
        </tr>
        <tr height="17" style="mso-height-source:userset;height:12.75pt">
            <td class="xl75" colspan="10" height="17" style="height:12.75pt;
  width:766pt" width="1019">
                　</td>
        </tr>
        <tr height="31" style="mso-height-source:userset;height:23.25pt">
            <td class="xl69" colspan="3" height="59" rowspan="2" style="border-right:.5pt solid black;
  border-bottom:.5pt solid black;height:44.25pt">
                名称</td>
            <td class="xl65" colspan="2" style="border-left:none">
                计划</td>
            <td class="xl65" colspan="3" style="border-left:none">
                生产情况</td>
            <td class="xl65" colspan="2" style="border-left:none">
                完成率(%)</td>
        </tr>
        <tr height="28" style="mso-height-source:userset;height:21.0pt">
            <td class="xl65" height="28" style="height:21.0pt;border-top:none;border-left:
  none">
                年</td>
            <td class="xl65" style="border-top:none;border-left:none">
                月</td>
            <td class="xl65" style="border-top:none;border-left:none">
                当日入库</td>
            <td class="xl65" style="border-top:none;border-left:none">
                本月累计</td>
            <td class="xl65" style="border-top:none;border-left:none">
                本年累计</td>
            <td class="xl65" style="border-top:none;border-left:none">
                月</td>
            <td class="xl65" style="border-top:none;border-left:none">
                年</td>
        </tr>
        <tr height="32" style="mso-height-source:userset;height:24.0pt">
            <td class="xl66" colspan="3" height="32" style="border-right:.5pt solid black;
  height:24.0pt">
                套管接箍(支)</td>
            <td class="xl65" style="border-top:none;border-left:none">
                <%=ntjiegujihua%></td>
            <td class="xl65" style="border-top:none;border-left:none">
                <%=ytjiegujihua %></td>
            <td class="xl65" style="border-top:none;border-left:none">
                <%=dtjiegu%></td>
            <td class="xl65" style="border-top:none;border-left:none">
                <%=mtjiegu%></td>
            <td class="xl65" style="border-top:none;border-left:none">
                <%=ytjiegu%></td>
            <td class="xl65" style="border-top:none;border-left:none">
                <%=mtjiegu完成率.ToString("0.0")%></td>
            <td class="xl65" style="border-top:none;border-left:none">
                <%=ytjiegu完成率.ToString("0.0")%></td>
        </tr>
        <tr height="32" style="mso-height-source:userset;height:24.0pt">
            <td class="xl66" colspan="3" height="32" style="border-right:.5pt solid black;
  height:24.0pt">
                油管接箍(支)</td>
            <td class="xl65" style="border-top:none;border-left:none">
                <%=nyjiegujihua%></td>
            <td class="xl65" style="border-top:none;border-left:none">
                <%=yyjiegujihua %></td>
            <td class="xl65" style="border-top:none;border-left:none">
                <%=dyjiegu %>　</td>
            <td class="xl65" style="border-top:none;border-left:none">
                <%=myjiegu%></td>
            <td class="xl65" style="border-top:none;border-left:none">
                <%=yyjiegu%></td>
            <td class="xl65" style="border-top:none;border-left:none">
                <%=myjiegu完成率.ToString("0.0")%></td>
            <td class="xl65" style="border-top:none;border-left:none">
                <%=yyjiegu完成率.ToString("0.0") %></td>
        </tr>
        <tr height="32" style="mso-height-source:userset;height:24.0pt">
            <td class="xl66" colspan="3" height="32" style="border-right:.5pt solid black;
  height:24.0pt">
                螺纹保护器(套)</td>
            <td class="xl65" style="border-top:none;border-left:none">
                <%=nbaohuqijihua%></td>
            <td class="xl65" style="border-top:none;border-left:none">
                <%=ybaohuqijihua%></td>
            <td class="xl65" style="border-top:none;border-left:none">
                <%=dbaohuqi%></td>
            <td class="xl65" style="border-top:none;border-left:none">
                <%=mbaohuqi%></td>
            <td class="xl65" style="border-top:none;border-left:none">
                <%=ybaohuqi%></td>
            <td class="xl65" style="border-top:none;border-left:none">
                <%=mbaohuqi完成率.ToString("0.0")%></td>
            <td class="xl65" style="border-top:none;border-left:none">
                <%=ybaohuqi完成率.ToString("0.0")%></td>
        </tr>
        <tr height="32" style="mso-height-source:userset;height:24.0pt">
            <td class="xl75" height="96" rowspan="3" style="height:72.0pt;border-top:
  none;width:47pt" width="63">
                带钢<br>分厂<br>(吨)<br>
            </td>
            <td class="xl65" colspan="2" style="border-left:none">
                精密合金</td>
            <td class="xl65" rowspan="3" style="border-top:none;border-left:none">
                <%=带钢年计划 %></td>
            <td class="xl65" style="border-top:none;border-left:none">
                <%=带钢月计划 %></td>
            <td class="xl65" style="border-top:none;border-left:none">
                <%=带钢当日 %></td>
            <td class="xl65" style="border-top:none;border-left:none">
                <%=带钢本月 %></td>
            <td class="xl65" style="border-top:none;border-left:none">
                <%=带钢本年 %></td>
            <td class="xl65" style="border-top:none;border-left:none">
                <%=带钢月完成率.ToString("0.0")%></td>
            <td class="xl65" style="border-top:none;border-left:none">
                <%=带钢年完成率.ToString("0.0")%></td>
        </tr>
        <tr height="32" style="mso-height-source:userset;height:24.0pt">
            <td class="xl65" colspan="2" height="32" style="height:24.0pt;border-left:none">
                不锈钢</td>
            <td class="xl65" style="border-top:none;border-left:none">
               <%=不锈钢月计划%></td>
            <td class="xl65" style="border-top:none;border-left:none">
               <%=不锈钢当日%></td>
            <td class="xl65" style="border-top:none;border-left:none">
               <%=不锈钢本月%></td>
            <td class="xl65" style="border-top:none;border-left:none">
                <%=不锈钢本年%></td>
            <td class="xl65" style="border-top:none;border-left:none">
                <%=不锈钢月完成率.ToString("0.0")%></td>
            <td class="xl65" style="border-top:none;border-left:none">
                <%=不锈钢年完成率.ToString("0.0")%></td>
        </tr>
        <tr height="32" style="mso-height-source:userset;height:24.0pt">
            <td class="xl65" colspan="2" height="32" style="height:24.0pt;border-left:none">
                外加工</td>
            <td class="xl65" style="border-top:none;border-left:none">
               <%=外加工月计划%></td>
            <td class="xl65" style="border-top:none;border-left:none">
               <%=外加工当日%></td>
            <td class="xl65" style="border-top:none;border-left:none">
               <%=外加工本月%></td>
            <td class="xl65" style="border-top:none;border-left:none">
                <%=外加工本年%></td>
            <td class="xl65" style="border-top:none;border-left:none">
                <%=外加工月完成率.ToString("0.0")%></td>
            <td class="xl65" style="border-top:none;border-left:none">
                <%=外加工年完成率.ToString("0.0")%></td>
        </tr>
          <tr height="32" style="mso-height-source:userset;height:24.0pt">
            <td class="xl66" colspan="3" height="32" style="border-right:.5pt solid black;
  height:24.0pt">
                带钢合计</td>
            <td class="xl65" style="border-top:none;border-left:none">
                <%=带钢年计划%></td>
            <td class="xl65" style="border-top:none;border-left:none">
                <%=带钢月计划 + 不锈钢月计划 + 外加工月计划%></td>
            <td class="xl65" style="border-top:none;border-left:none">
                <%=带钢当日 + 不锈钢当日 + 外加工当日%></td>
            <td class="xl65" style="border-top:none;border-left:none">
                <%=带钢本月 + 不锈钢本月 + 外加工本月%></td>
            <td class="xl65" style="border-top:none;border-left:none">
                <%=带钢本年 + 不锈钢本年 + 外加工本年%></td>
            <td class="xl65" style="border-top:none;border-left:none">
                <%=带钢合计月完成率.ToString("0.0")%></td>
            <td class="xl65" style="border-top:none;border-left:none">
                <%=带钢合计年完成率.ToString("0.0")%></td>
        </tr>
        <tr height="30" style="mso-height-source:userset;height:22.5pt">
            <td class="xl76" colspan="4" height="30" style="height:22.5pt">
                填报单位：生产处</td>
            <td class="xl77">
            </td>
            <td>
            </td>
            <td class="xl78">
            </td>
            <td>
            </td>
            <td class="xl79" colspan="2">
                填报人：赵俐姝</td>
        </tr>
        <![if supportMisalignedColumns]>
        <tr height="0" style="display:none">
            <td style="width:47pt" width="63">
            </td>
            <td style="width:35pt" width="46">
            </td>
            <td style="width:36pt" width="48">
            </td>
            <td style="width:75pt" width="100">
            </td>
            <td style="width:75pt" width="100">
            </td>
            <td style="width:116pt" width="154">
            </td>
            <td style="width:116pt" width="154">
            </td>
            <td style="width:116pt" width="154">
            </td>
            <td style="width:75pt" width="100">
            </td>
            <td style="width:75pt" width="100">
            </td>
        </tr>
        <![endif]></col>
        </col>
        </col>
        </col>
        </col>
        </col>
    </colgroup>
</table>

</div>



      </asp:Panel>

    </form>
    
    <script>
        var textboxs = document.getElementsByTagName("input");
        for (var i = 0; i < textboxs.length; i++) {
            if (textboxs[i].className == "pageturn" || textboxs[i].className == "intxt1" || textboxs[i].className == "intxt2") {
                textboxs[i].onfocus = function(e) { this.select(); };
            }
        }
        parent.hidesubmenu(true);
    </script>
</body>
</html>